﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 剪刀石头布游戏
{ 
    class ComputerPlayer : Player
    {
        static Random rand = new Random();
        public override int getInputValue()
        {
            int value = rand.Next(1, 4);
            if (value == 1)
            {
                Console.WriteLine("剪刀");
            }
            else if (value == 2)
            {
                Console.WriteLine("石头");
            }
            else if (value == 3)
            {
                Console.WriteLine("布");
            }
            return value;
        }

        public string getPlayerName(int num)
        {
            if (num == 1)
            {
                name = "刘备";
            }
            else if (num == 2)
            {
                name = "孙权";
            }
            else if (num == 3)
            {
                name = "曹操";
            }
            return name;
        }
    }
}
